<div class="frame_addProductDiv">
	<form id="statistics_orderForm" method="post" action="administrator-statistics-orderdetail">
	  <table width="100%" border="1" cellpadding="0" cellspacing="0" bordercolor="#c8d9e9">
		<tr>
		  <td colspan="2" class="se" style="text-align:left">
		  	<strong>按条件筛选</strong>
		  </td>
		</tr>
		<tr>
		  <td valign="middle" class="ri-bbgg"><span class="red"></span> 时间： </td>
		  <td class="le">
		  	<div>
				<input name="begintime" value="<?php echo $this->beginTime;?>"/> - <input name="endtime" value="<?php echo $this->endTime;?>"/>
			</div>
		  </td>
		</tr>
		<tr>
		  <td valign="middle" class="ri-bbgg"><span class="red"></span> 状态： </td>
		  <td class="le">
		  	<select name="flid" id="flid">
				<option value="0">全部</option>
				<?foreach($this->fenleiArray as $value):?>
				<option value="<?=$value['flid']?>"<?php if ($this->flid == $value['flid']) {echo ' selected';}?>><?=$value['flname']?></option>
				<?endforeach;?>
		 	</select>
		  </td>
		</tr>
		<tr>
		  <td valign="top" class="ri-bbgg"><span class="red"></span></td>
		  <td class="le">
		  	<div>
				<input type="submit" value="提交搜索" />
			</div>
		  </td>
		</tr>
	  </table>
	</form>
	<?php if ($this->result):?>
		<table width="100%" border="1" cellpadding="0" cellspacing="0" bordercolor="#c8d9e9">		
		<tr>
		  <td valign="middle" class="ri-bbgg"><span class="red"></span>订单总数量: </td>
		  <td class="le">
		  	<div>
				<?php echo $this->result['order_count'];?>
			</div>
		  </td>
		</tr>
		<tr>
		  <td valign="middle" class="ri-bbgg"><span class="red"></span> 总金额 </td>
		  <td class="le">
		  	$<?php echo $this->result['total_amount'];?>
		  </td>
		</tr>
		<tr>
		  <td valign="middle" class="ri-bbgg"><span class="red"></span>会员数量</td>
		  <td class="le">
		  	<?php echo $this->result['member_count'];?>
		  </td>
		</tr>
		<tr>
		  <td valign="middle" class="ri-bbgg"><span class="red"></span>非注册会员数量</td>
		  <td class="le">
		  	<?php echo $this->result['member_ano_count'];?>
		  </td>
		</tr>
		<tr>
		  <td valign="middle" class="ri-bbgg"><span class="red"></span>单款球衣总数量</td>
		  <td class="le">
		  	<?php echo count($this->result['product']);?>
		  </td>
		</tr>
		<tr>
		  <td valign="middle" class="ri-bbgg"><span class="red"></span>购买球衣总件数</td>
		  <td class="le">
		  	<?php echo $this->result['counts'];?>
		  </td>
		</tr>
		<!-- <tr>
		  <td valign="middle" class="ri-bbgg"><span class="red"></span>查看明细</td>
		  <td class="le">
		  	<input type="button" value="查看" onclick="$('#content').toggle();"></input>
		  </td>
		</tr> -->
		
		<tr>
		  <td colspan="2">
		  <table border="1" cellpadding="0" cellspacing="0" bordercolor="#c8d9e9" id="content">
		<?php foreach ($this->products as $_k=>$_v):?>
		<tr>
		  <td valign="middle" class="ri-bbgg" align="center" style="text-align:center;">
		  		<?php 
		  			$item = $this->item->getDetail($_k, 'product');		  			
		  		?>
		  		<a href="/pd-<?php echo $_k?>.html" target="_blank">
		  			<!--  <img src="/<?php echo $item[0]['cut_url'];?>" height="50"></img><br></br> -->
		  			<?php echo $item[0]['subject'];?>
		  		</a>
		  </td>
		  <td class="le">
		  	<table width="100%" border="1" cellpadding="0" cellspacing="0" >	
				<tr>
					<td height="30" width="30" align="center">
						尺码
					</td>
					<?php foreach ($_v as $_key=>$_value):?>
					<td align="center">
						<?php echo $_key;?>
					</td>
					<?php endforeach;?>		
				</tr>
				<tr>
					<td height="30" align="center"> 
						出售
					</td>
					<?php foreach ($_v as $_key=>$_value):?>
					<td align="center">
						<?php echo $_value;?>
					</td>
					<?php endforeach;?>		
				</tr>
	  		</table>
		  </td>
		</tr>		
		<?php endforeach;?>
		<tr><td colspan="2" height="24" align="center"><?php echo $this->page ?></td></tr>
		</table>
		</td>
		</tr>
	  </table>
	<?php endif;?>
	
	  <div class="addProductSubmit">
	  </div>
</div>